package javaio12.filedemo;

import java.io.File;
import java.io.IOException;

public class FileDemo02
{

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException
	{

		File f = new File("f:"+File.separator);
		printf(f);
	}
	private static  void printf(File f)
	{
		if(f != null)
		{
			
			if(f.isDirectory())
			{
				File[] tem = f.listFiles();
				if(tem!=null)
				{
				for(int i=0;i<tem.length;i++ )
				{
					printf(tem[i]);
				}}
			}
			else{
				System.out.println(f);
			}
		}
	}

}
